<% use_page_title "Rails Routes" %>
<%= render layout: 'page_title' do %>
    <%= link_to "Page Routes", page_routes_path, class: 'btn btn-primary right' %>
<% end %>

<div class="padded row-fluid">
  <%= form_tag routes_path, :method => :get do %>
    <label>
      Path to Test: <%= text_field_tag :path, @path, :size => 50 %>
    </label>
    <% unless @route.blank? %>
      <div style="margin: 10px 0">
        <%=h @route.inspect %>
      </div>
    <% end %>
  <% end %>
</div>
<%= render layout: 'main_content' do %>
<table class="data cms-content-table table table-striped table-bordered table-hover">
  <thead>  
	  <tr>
	    <th>Name</th>
	    <th>Verb</th>
	    <th>Pattern</th>
        <th>Result</th>
	  </tr>
  </thead>
  <% for route in @routes %><tr>
    <td><%=h route[:name] %></td>
    <td><%=h route[:verb] %></td>
    <td><%=h route[:segs] %></td>
    <td><%=h route[:reqs] %></td>
  </tr><% end %>
</table>
  <% end %>
